package rrrmai.service;

import java.util.List;

import io.reactivex.Flowable;
import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rrrmai.model.Rsp;
import rrrmai.viewbinder.Post;

/**
 * Created by summer on 2018/3/20.
 */

public interface PostService {

    @GET("rpc/getPostList")
    Flowable<Rsp<List<Post>>> getPostList(@Query("page") int page
            , @Query("pageSize") int pageSize
    );

    @POST("rpc/post")
    @FormUrlEncoded
    Flowable<Rsp<Post>> post(@Field("post") Post post);

}
